Skip to content

yamux/control: Ensure poll next inbound is not called after errors#445

Merged
lexnv merged 6 commits intomasterfrom
lexnv/yamux-err
Oct 21, 2025
Merged

yamux/control: Ensure poll next inbound is not called after errors#445
lexnv merged 6 commits intomasterfrom
lexnv/yamux-err

Conversation

@lexnv
Copy link
Copy Markdown
Collaborator

@lexnv lexnv commented Oct 15, 2025

We have recently fixed a spurious issue that caused the rust-yamux component to panic.

Litep2p transitioned the internal state of the connection back to Idle.
This causes litep2p to poll the component again. Then rust-yamux would use the same buffer offset that caused the panic in the first place.

Instead, this PR ensures that litep2p never polls the connection once yamux encounters an error.
This is aligned with the behavior of transport layers that close the connection on the first yamux error.

Part of: paritytech/polkadot-sdk#9169

cc @paritytech/networking

lexnv added 3 commits October 15, 2025 09:01
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Comment thread src/yamux/control.rs Outdated
lexnv and others added 3 commits October 15, 2025 15:18
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
@lexnv lexnv merged commit 300673c into master Oct 21, 2025
8 checks passed
@lexnv lexnv deleted the lexnv/yamux-err branch October 21, 2025 11:02
lexnv added a commit that referenced this pull request Oct 28, 2025
## [0.11.1] - 2025-10-28

This release ensures that polling the yamux controller after an error
does not lead to unexpected behavior.

### Fixed

- yamux/control: Ensure poll next inbound is not called after errors
([#445](#445))


cc @paritytech/networking

---------

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants